package com.aptech.domain.JPA;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * NewsCategory entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "NEWS_CATEGORY", schema = "dbo", catalog = "Blue_Pumpkin")
public class NewsCategory implements java.io.Serializable {

	// Fields

	private Integer newsCategoryId;
        private String newsCategoryTitle;
	private Set<News> newses = new HashSet<News>(0);

	// Constructors

	/** default constructor */
	public NewsCategory() {
	}


	// Property accessors
	@Id
	@Column(name = "NEWS_CATEGORY_ID", unique = true, nullable = false)
	public Integer getNewsCategoryId() {
		return this.newsCategoryId;
	}

	public void setNewsCategoryId(Integer newsCategoryId) {
		this.newsCategoryId = newsCategoryId;
	}

	@Column(name = "NEWS_CATEGORY_TITLE", nullable = true)
	public String getNewsCategoryTitle() {
		return this.newsCategoryTitle;
	}

	public void setNewsCategoryTitle(String newsCategoryTitle) {
		this.newsCategoryTitle = newsCategoryTitle;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "newsCategory")
	public Set<News> getNewses() {
		return this.newses;
	}

	public void setNewses(Set<News> newses) {
		this.newses = newses;
	}

}